package com.gxnualbert.proxy.observer;

/**
 * @auther gxnualbert
 * @create 2021-05-03-21:02
 */
public class ObserverTest {
    public static void main(String[] args) {
        ProductList observable = ProductList.getInstance();
        TaoBaoObserver taoBaoObserver = new TaoBaoObserver();
        JingDongObserver jdObserver = new JingDongObserver();
        SuNingObserver suNingObserver = new SuNingObserver();
        TianMaoObserver tianMaoObserver = new TianMaoObserver();
        observable.addObserver(jdObserver);
        observable.addObserver(taoBaoObserver);
        observable.addObserver(suNingObserver);
        observable.addObserver(tianMaoObserver);
        observable.addProudct("新产品：比亚迪宋plus");
    }
}
